<?php
/* @var $this PostsController */
/* @var $model Posts */

$this->breadcrumbs=array(
	'内容管理'=>array('admin', 'category_id'=>$model->category_id),
         $model->post_title,
);

$this->menu=array(
	array('label'=>'添加', 'url'=>array('create', 'category_id' => $model->category_id)),
	array('label'=>'修改', 'url'=>array('update', 'id'=>$model->id)),
	array('label'=>'删除', 'url'=>'#', 'linkOptions'=>array('submit'=>array('delete','id'=>$model->id),'confirm'=>'Are you sure you want to delete this item?')),
	array('label'=>'内容管理', 'url'=>array('admin', 'category_id'=>$model->category_id)),
);
?>

<h1><?php echo $model->post_title; ?></h1>

<?php $this->widget('zii.widgets.CDetailView', array(
	'data'=>$model,
	'attributes'=>array(
                array(
                    'name' => 'category_id',
                    'value' => Categorys::model()->findByPk($model->category_id)->category_name,
                ),
		'post_model',
		'post_author',
		'post_date',
		array(
                    'name' => 'post_content',
                    'type' => 'raw',
                ),
		'post_title',
		'post_alias',
		'post_uid',
		array(
                    'name' => 'post_status',
                    'value' => $model->status_array[$model->post_status],
                ),
		'seo_title',
		'seo_keywords',
		'seo_description',
		array(
                    'name' => 'comment_status',
                    'value' => Posts::model()->comment_status_array[$model->comment_status],
                ),
		'comment_count',
		'show_num',
                array(
                    'name' => 'post_resources',
                    'value' => PostResources::model()->getResources($model->id),
                    'type' => 'raw'
                ),
	),
)); ?>
